import { DataSource } from "typeorm"

// 创建数据库
export const AppDataSource = new DataSource({
  type: "mysql",
  host: "localhost",
  port: 3306,
  username: "root",
  password: "123456",
  database: "smart_learning_backend",
  entities: ["src/entities/*.ts"],
  logging: true,
  synchronize: true, // 自动创建表结构
  connectTimeout: 10000, // 增加连接超时时间
})

